package com.supercube.system.domain;

import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonInclude;
import io.swagger.annotations.ApiModelProperty;
import lombok.Builder;
import lombok.Data;

import java.io.Serializable;
import java.util.List;

@Data
@JsonInclude(JsonInclude.Include.NON_NULL)
public class CubeMenuDO implements Serializable {
	private static final long serialVersionUID = 1L;

  @JsonIgnore
  private Long menuId;
  @JsonIgnore
  private Long parentId;

  @ApiModelProperty(value = "路径")
	private String path;

  @ApiModelProperty(value = "菜单名称")
  private String name;

  @ApiModelProperty(value = "重定向")
  private String redirect;

  @ApiModelProperty(value = "菜单图标")
  private String icon;

  @ApiModelProperty(value = "是否显示")
  private Boolean hideInMenu;

  @ApiModelProperty(value = "子路由")
  private List<CubeMenuDO> children;

  @Builder
  public CubeMenuDO(Long menuId, Long parentId, String path, String name, String redirect, String icon, Boolean hideInMenu, List<CubeMenuDO> children) {
    this.menuId = menuId;
    this.parentId = parentId;
    this.path = path;
    this.name = name;
    this.redirect = redirect;
    this.icon = icon;
    this.hideInMenu = hideInMenu;
    this.children = children;
  }
}
